package com.yurun.controller;

import com.yurun.entity.Category;
import com.yurun.model.vo.Result;
import com.yurun.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class CategoryController {
    @Autowired
    CategoryService categoryService;
    /**
     * @Description: 前台-文章分类信息
     * @Param:
     * @return: com.yurun.model.vo.Result
     * @Author: JimmyYao
     * @Date: 2022/2/9
     */
    @GetMapping("/category")
    public Result getCategory(){
        List<Category> object=categoryService.getCategoryList();
        return Result.ok("类别",object);
    }
}
